package com.nuanshui.heatedloan.msgcenter.model;

import java.util.Date;

import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import com.nuanshui.heatedloan.dal.BaseEntityImpl;



public class AppPushMsg extends BaseEntityImpl{

	private static final long serialVersionUID = -3589226440608109384L;
	private String  title;//标题
	private String  content;//内容
	private String  msgTitle;//本条消息的后台页面显示标题，不是推送给用户看的
	private Integer actionType;//消息类型
	@DateTimeFormat(pattern="yyyy-MM-dd hh-mm-ss")
	private Date pushTime;//发送时间
	private Integer android;
	private Integer ios;
	private Integer oneOrMany; //1 是多，0是单独推送
	private String userIds;//推送的用户id，以 , 分割
	private String directUrl;//推送链接
	private Integer badge = 1;//脚表 默认为1
	private Integer env;//环境 测试和生产

	private Integer detailId;
	private String  detailName;
	private Integer detailType;
	private Integer action;
	private String msgId;
	private Integer saveHours;//保存多少小时
	private Integer urlType;//地址类型
	private Integer tabType;
	private String nick;

	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public Integer getDetailId() {
		return detailId;
	}
	public void setDetailId(Integer detailId) {
		this.detailId = detailId;
	}
	public String getDetailName() {
		return detailName;
	}
	public void setDetailName(String detailName) {
		this.detailName = detailName;
	}
	public Integer getDetailType() {
		return detailType;
	}
	public void setDetailType(Integer detailType) {
		this.detailType = detailType;
	}
	public Integer getAction() {
		return action;
	}
	public void setAction(Integer action) {
		this.action = action;
	}
	public String getMsgId() {
		return msgId;
	}
	public void setMsgId(String msgId) {
		this.msgId = msgId;
	}
	public Integer getActionType() {
		return actionType;
	}
	public void setActionType(Integer actionType) {
		this.actionType = actionType;
	}
	public Integer getBadge() {
		return badge;
	}
	public void setBadge(Integer badge) {
		this.badge = badge;
	}
	public Integer getEnv() {
		return env;
	}
	public void setEnv(Integer env) {
		this.env = env;
	}
	public Date getPushTime() {
		return pushTime;
	}
	public void setPushTime(Date pushTime) {
		this.pushTime = pushTime;
	}
	public Integer getSaveHours() {
		return saveHours;
	}
	public void setSaveHours(Integer saveHours) {
		this.saveHours = saveHours;
	}

	public String getDirectUrl() {
		return directUrl;
	}

	public void setDirectUrl(String directUrl) {
		this.directUrl = directUrl;
	}

	public Integer getUrlType() {
		return urlType;
	}
	public void setUrlType(Integer urlType) {
		this.urlType = urlType;
	}
	public Integer getTabType() {
		return tabType;
	}
	public void setTabType(Integer tabType) {
		this.tabType = tabType;
	}
	public Integer getAndroid() {
		return android;
	}
	public void setAndroid(Integer android) {
		this.android = android;
	}
	public Integer getIos() {
		return ios;
	}
	public void setIos(Integer ios) {
		this.ios = ios;
	}
	
	public String getUserIds() {
		return userIds;
	}
	public void setUserIds(String userIds) {
		this.userIds = userIds;
	}
	public String getNick() {
		return nick;
	}
	public void setNick(String nick) {
		this.nick = nick;
	}
	public Integer getOneOrMany() {
		return StringUtils.isEmpty(this.userIds) ? 1 : 0;
	}
	public void setOneOrMany(Integer oneOrMany) {
		this.oneOrMany = oneOrMany;
	}
}
